import request from '@/service/request'

//获取用户信息
export function getUserInfo() {
  return request.get('/user/info')
}
//修改用户信息
export function updateUserInfo(params) {
  return request.post('/user/update', params)
}

//获取发布商品列表
export function getPublishGoods(params = {}) {
  return request.post('/item/my/page', params)
}

//获取购买商品列表
export function getBuyGoods(params = {}) {
  return request.post('/order/page', params)
}

//提现
export function encashment(account: string, account_name: string, amount: number) {
  return request.post('/user/encashment', {
    account,
    account_name,
    amount,
  })
}
